package model

import (
	"gorm.io/gorm"
	"time"
)

// 用户文件表
type UserFile struct {
	gorm.Model
	UserName   string    `json:"user_name" gorm:"not null;comment:'用户名'"`
	FileSha1   string    `json:"file_sha1" gorm:"not null;comment:'文件hash'"`
	FileSize   int64     `json:"file_size" gorm:"comment:'文件大小'"`
	FileName   string    `json:"file_name" gorm:"not null;comment:'文件名'"`
	UploadAt   time.Time `json:"upload_at" gorm:"comment:'上传时间'"`
	LastUpdate time.Time `json:"last_update" gorm:"comment:'最后修改时间'"`
	Status     int       `json:"status" gorm:"not null;default:0;comment:'文件状态(0正常1已删除2禁用)'"`
}
